<script lang="ts" setup>
import { BorderBottomOutlined } from "@ant-design/icons-vue";

const props = defineProps({
  unit: {
    type: String,
    default: ''
  },
  title: {
    type: String,
    default: ''
  },
  public: {
    type: Object,
    default: () =>{
      return {}
    }
  },
  requestParams: {
    type: Object,
    default: () =>{
      return {}
    }
  },
})

</script>

<template>
  <div class="wrapper-list">
    <a-card :bordered="false" class="wrapper-list-card" :border="false">
      <template #title>
        <a-space class="wrapper-card-title">
          <a-typography-title class="title-left-title">
            {{ title }}<span>{{ unit }}</span>
          </a-typography-title>
        </a-space>
      </template>
      <template #extra>
        <a-typography-title class="title-left-title">
          <slot name="extra"></slot>
        </a-typography-title>
      </template>
      <!-- 图表 -->
      <slot name="chart"></slot>
    </a-card>
  </div>
</template>

<style scoped lang="less">
@font-size: 14px;
@font-size-mini: 12px;
@font-size-medium: 16px;
@font-size-large: 22px;
@color-w: white;
@font-family: Source Han Sans;

.wrapper-list {
  background: rgba(0, 0, 100, 0.1);
  width: 100%;
  height: 100%;
  position: relative;

}

/* title样式 */
.wrapper-list-card {
  background-color: transparent;
  height: 100%;
  padding: 0;
  display: grid;
  grid-template-rows: 30px 1fr;
  border: 1px solid #0d6cc3;

  :deep(.arco-card-body) {
    height: 100%;
    padding: 0;
    overflow-y: hidden;
    scrollbar-width: none; /* 适用于 Firefox */
    -ms-overflow-style: none; /* 适用于 Internet Explorer 和 Edge */
  }

  .wrapper-card-title {
    display: flex;
    align-items: center;

    .title-left-title {
      font-size: @font-size-medium;
      color: @color-w;
      padding: 6px 36px 6px 16px;
      margin: 0 15px 0 0;
      width: 200px;
      background: url('../../../../assets/bi/navbar.png') no-repeat;
      background-size: 100% 100%;

      span {
        font-weight: 400;
        font-size: @font-size-mini;
        margin-left: 4px;
      }
    }

    :deep(.arco-space-item) {
      font-size: @font-size;
      color: @color-w;

      .title-process {
        span {
          color: #f3921d;
        }
      }
    }
  }

  .chart-view {
    width: 100%;
    height: 100%;
  }

  :deep(.arco-card-header) {
    border: none;
    background: url('../../../../assets/bi/navbar.png') no-repeat 190px;
    background-size: auto 100%;
    height: auto;
  }
}
</style>